<!DOCTYPE html>



  


<html class="theme-next gemini use-motion" lang="zh-Hans">
<head><meta name="generator" content="Hexo 3.8.0">
  <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform">
<meta http-equiv="Cache-Control" content="no-siteapp">
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css">







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css">

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css">


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="frp,">










<meta name="description" content="frp在centos上的安装与配置下载 frp下载地址: https://github.com/fatedier/frp/releases    下载自己需要的版本 将软件下载到服务器和客户端（服务端和客户端相同）  解压frp软件包 1tar -zxvf frp_0.8.1_linux_amd64.tar.gz 进入解压后的文件夹 1cd frp_0.8.1_linux_amd64 文件说明">
<meta name="keywords" content="frp">
<meta property="og:type" content="article">
<meta property="og:title" content="frp在centos上的安装与配置">
<meta property="og:url" content="https://blog.xiezc.xyz/2018/11/02/frp_ngrok/frp安装与配置/index.html">
<meta property="og:site_name" content="xiezc的小站">
<meta property="og:description" content="frp在centos上的安装与配置下载 frp下载地址: https://github.com/fatedier/frp/releases    下载自己需要的版本 将软件下载到服务器和客户端（服务端和客户端相同）  解压frp软件包 1tar -zxvf frp_0.8.1_linux_amd64.tar.gz 进入解压后的文件夹 1cd frp_0.8.1_linux_amd64 文件说明">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="d:/Program/VNote/myNote/知识总结/4830242-9b11c67e4f72a3fa.png">
<meta property="og:image" content="d:/Program/VNote/myNote/知识总结/4830242-df4aa43d141e8448.png">
<meta property="og:updated_time" content="2019-04-04T14:44:30.953Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="frp在centos上的安装与配置">
<meta name="twitter:description" content="frp在centos上的安装与配置下载 frp下载地址: https://github.com/fatedier/frp/releases    下载自己需要的版本 将软件下载到服务器和客户端（服务端和客户端相同）  解压frp软件包 1tar -zxvf frp_0.8.1_linux_amd64.tar.gz 进入解压后的文件夹 1cd frp_0.8.1_linux_amd64 文件说明">
<meta name="twitter:image" content="d:/Program/VNote/myNote/知识总结/4830242-9b11c67e4f72a3fa.png">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Gemini',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://blog.xiezc.xyz/2018/11/02/frp_ngrok/frp安装与配置/">





  <title>frp在centos上的安装与配置 | xiezc的小站</title>
  





  <script type="text/javascript">
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?8ae02d8cf311eabbae2621ff2d51a260";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>




</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">xiezc的小站</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">xiezc的小站</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br>
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br>
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br>
            
            归档
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://blog.xiezc.xyz/2018/11/02/frp_ngrok/frp安装与配置/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="xiezc">
      <meta itemprop="description" content>
      <meta itemprop="image" content="/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="xiezc的小站">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">frp在centos上的安装与配置</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2018-11-02T09:34:53+08:00">
                2018-11-02
              </time>
            

            

            
          </span>

          
            <span class="post-category">
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/java/" itemprop="url" rel="index">
                    <span itemprop="name">java</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          
             <span id="/2018/11/02/frp_ngrok/frp安装与配置/" class="leancloud_visitors" data-flag-title="frp在centos上的安装与配置">
               <span class="post-meta-divider">|</span>
               <span class="post-meta-item-icon">
                 <i class="fa fa-eye"></i>
               </span>
               
                 <span class="post-meta-item-text">阅读次数&#58;</span>
               
                 <span class="leancloud-visitors-count"></span>
             </span>
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h1 id="frp在centos上的安装与配置"><a href="#frp在centos上的安装与配置" class="headerlink" title="frp在centos上的安装与配置"></a>frp在centos上的安装与配置</h1><h2 id="下载-frp"><a href="#下载-frp" class="headerlink" title="下载 frp"></a>下载 frp</h2><p>下载地址: <a href="https://github.com/fatedier/frp/releases" target="_blank" rel="noopener">https://github.com/fatedier/frp/releases</a>    下载自己需要的版本</p>
<p>将软件下载到服务器和客户端<em>（服务端和客户端相同）</em></p>
<p> 解压frp软件包</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">tar -zxvf frp_0.8.1_linux_amd64.tar.gz</span><br></pre></td></tr></table></figure>
<p>进入解压后的文件夹</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">cd frp_0.8.1_linux_amd64</span><br></pre></td></tr></table></figure>
<p>文件说明</p>
<blockquote>
<p><code>frps.ini</code>: 服务端配置文件<br> <code>frps</code>: 服务端软件<br> <code>frpc.ini</code>: 客户端配置文件<br> <code>frpc</code>: 客户端软件</p>
</blockquote>
<h2 id="修改客户端和服务端的配置"><a href="#修改客户端和服务端的配置" class="headerlink" title="修改客户端和服务端的配置"></a>修改客户端和服务端的配置</h2><p> 配置文件在下面</p>
<h2 id="启动服务端"><a href="#启动服务端" class="headerlink" title="启动服务端"></a>启动服务端</h2><p>开启服务端服务(在frp_0.8.1_linux_amd64目录下) </p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">./frps -c ./frps.ini</span><br></pre></td></tr></table></figure>
<p>启动成功的图片</p>
<p><img src="D:\Program\VNote\myNote\知识总结\4830242-9b11c67e4f72a3fa.png" alt="img"> </p>
<h2 id="启动客户端"><a href="#启动客户端" class="headerlink" title="启动客户端"></a>启动客户端</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">./frpc -c ./frpc.ini</span><br></pre></td></tr></table></figure>
<p>启动成功后的图片 <img src="D:\Program\VNote\myNote\知识总结\4830242-df4aa43d141e8448.png" alt="img"> </p>
<h2 id="后台运行frp服务"><a href="#后台运行frp服务" class="headerlink" title="后台运行frp服务"></a>后台运行frp服务</h2><ul>
<li>服务端： nohup ./frps -c frps.ini &gt;/dev/null 2&gt;&amp;1 &amp;</li>
<li><p>客户端： nohup ./frpc -c frpc.ini &gt;/dev/null 2&gt;&amp;1 &amp;</p>
</li>
<li><p>说明：&gt;/dev/null 2&gt;&amp;1 &amp;，表示丢弃</p>
</li>
</ul>
<h3 id="服务端的配置-frps-ini"><a href="#服务端的配置-frps-ini" class="headerlink" title="服务端的配置 frps.ini"></a>服务端的配置 frps.ini</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">[common]</span><br><span class="line">#服务器的控制连接端口</span><br><span class="line">bind_port = 8000</span><br><span class="line">bind_udp_port = 8001</span><br><span class="line">kcp_bind_port = 8000</span><br><span class="line"># http协议转发的端口</span><br><span class="line">vhost_http_port = 8080</span><br><span class="line">vhost_https_port = 8443</span><br><span class="line">#控制台的配置</span><br><span class="line">dashboard_port = 8002</span><br><span class="line">dashboard_user = admin</span><br><span class="line">dashboard_pwd = xzcby</span><br><span class="line"></span><br><span class="line">token = xzcby123456</span><br></pre></td></tr></table></figure>
<h3 id="客户端的配置-frpc-ini"><a href="#客户端的配置-frpc-ini" class="headerlink" title="客户端的配置 frpc.ini"></a>客户端的配置 frpc.ini</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br></pre></td><td class="code"><pre><span class="line">[common]</span><br><span class="line">server_addr = 47.99.213.62</span><br><span class="line">server_port = 8000</span><br><span class="line">token = xzcby123456</span><br><span class="line"></span><br><span class="line"># set admin address for control frpc&apos;s action by http api such as reload</span><br><span class="line">admin_addr = 127.0.0.1</span><br><span class="line">admin_port = 8400</span><br><span class="line">admin_user = admin</span><br><span class="line">admin_passwd = xzc123456</span><br><span class="line"></span><br><span class="line"># ssh链接对应服务器上的8003 端口</span><br><span class="line">[ssh]</span><br><span class="line">type = tcp</span><br><span class="line">local_ip = 127.0.0.1</span><br><span class="line">local_port = 22</span><br><span class="line">use_encryption = false</span><br><span class="line">use_compression = true</span><br><span class="line">remote_port = 8003</span><br><span class="line"># 同一个分组同一个key的会配置负载均衡. 不启用</span><br><span class="line"># group = test_group</span><br><span class="line"># group_key = 123456</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"># tcp连接只是支持8500到9000之间的500个端口, 启用压缩和加密</span><br><span class="line">[range:tcp_port]</span><br><span class="line">type = tcp</span><br><span class="line">local_ip = 127.0.0.1</span><br><span class="line">local_port = 8900-9000</span><br><span class="line">remote_port = 8900-9000</span><br><span class="line">use_encryption = false</span><br><span class="line">use_compression = false</span><br><span class="line"></span><br><span class="line"># 后期可以配置自己的dns服务, 可以实现自己的 域名贼爽</span><br><span class="line">[dns]</span><br><span class="line">type = udp</span><br><span class="line">local_ip = 114.114.114.114</span><br><span class="line">local_port = 53</span><br><span class="line">remote_port = 6002</span><br><span class="line">use_encryption = false</span><br><span class="line">use_compression = false</span><br><span class="line"></span><br><span class="line">[range:udp_port]</span><br><span class="line">type = udp</span><br><span class="line">local_ip = 127.0.0.1</span><br><span class="line">local_port = 8900-9000</span><br><span class="line">remote_port = 8900-9000</span><br><span class="line">use_encryption = false</span><br><span class="line">use_compression = false</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">[web01]</span><br><span class="line">type = http</span><br><span class="line">local_ip = 127.0.0.1</span><br><span class="line">local_port = 8080</span><br><span class="line">use_encryption = true</span><br><span class="line">use_compression = true</span><br><span class="line">header_X-From-Where = frp</span><br><span class="line"></span><br><span class="line">[web02]</span><br><span class="line">type = https</span><br><span class="line">local_ip = 127.0.0.1</span><br><span class="line">local_port = 8443</span><br><span class="line">use_encryption = false</span><br><span class="line">use_compression = true</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"># 不用配置转发代理, 因为服务器在国内, 配置了有何用</span><br><span class="line"># [plugin_http_proxy]</span><br><span class="line"># type = tcp</span><br><span class="line"># remote_port = 6004</span><br><span class="line"># plugin = http_proxy</span><br><span class="line"># plugin_http_user = abc</span><br><span class="line"># plugin_http_passwd = abc</span><br><span class="line"></span><br><span class="line"># [plugin_socks5]</span><br><span class="line"># type = tcp</span><br><span class="line"># remote_port = 6005</span><br><span class="line"># plugin = socks5</span><br><span class="line"># plugin_user = abc</span><br><span class="line"># plugin_passwd = abc</span><br><span class="line"></span><br><span class="line"># 映射本地静态文件, 可以做文件服务器</span><br><span class="line"># [plugin_static_file]</span><br><span class="line"># type = tcp</span><br><span class="line"># remote_port = 6006</span><br><span class="line"># plugin = static_file</span><br><span class="line"># plugin_local_path = /var/www/blog</span><br><span class="line"># plugin_strip_prefix = static</span><br><span class="line"># plugin_http_user = abc</span><br><span class="line"># plugin_http_passwd = abc</span><br><span class="line"></span><br><span class="line"># 加密链接. 只有请求者也安装frpc, 并且token相同的才可以链接</span><br><span class="line"># [secret_tcp]</span><br><span class="line"># If the type is secret tcp, remote_port is useless</span><br><span class="line"># Who want to connect local port should deploy another frpc with stcp proxy and role is visitor</span><br><span class="line"># type = stcp</span><br><span class="line"># sk used for authentication for visitors</span><br><span class="line"># sk = abcdefg</span><br><span class="line"># local_ip = 127.0.0.1</span><br><span class="line"># local_port = 22</span><br><span class="line"># use_encryption = false</span><br><span class="line"># use_compression = false</span><br><span class="line"></span><br><span class="line"># user of frpc should be same in both stcp server and stcp visitor</span><br><span class="line"># [secret_tcp_visitor]</span><br><span class="line"># frpc role visitor -&gt; frps -&gt; frpc role server</span><br><span class="line"># role = visitor</span><br><span class="line"># type = stcp</span><br><span class="line"># the server name you want to visitor</span><br><span class="line"># server_name = secret_tcp</span><br><span class="line"># sk = abcdefg</span><br><span class="line"># connect this address to visitor stcp server</span><br><span class="line"># bind_addr = 127.0.0.1</span><br><span class="line"># bind_port = 9000</span><br><span class="line"># use_encryption = false</span><br><span class="line"># use_compression = false</span><br><span class="line"></span><br><span class="line"># 下面的配置适用于点对点的穿透的访问, 流量不经过服务器, 成功率较低</span><br><span class="line"># [p2p_tcp]</span><br><span class="line"># type = xtcp</span><br><span class="line"># sk = abcdefg</span><br><span class="line"># local_ip = 127.0.0.1</span><br><span class="line"># local_port = 22</span><br><span class="line"># use_encryption = false</span><br><span class="line"># use_compression = false</span><br><span class="line"></span><br><span class="line"># [p2p_tcp_visitor]</span><br><span class="line"># role = visitor</span><br><span class="line"># type = xtcp</span><br><span class="line"># server_name = p2p_tcp</span><br><span class="line"># sk = abcdefg</span><br><span class="line"># bind_addr = 127.0.0.1</span><br><span class="line"># bind_port = 9001</span><br><span class="line"># use_encryption = false</span><br><span class="line"># use_compression = false</span><br></pre></td></tr></table></figure>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/frp/" rel="tag"># frp</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2018/11/01/linux/linux下的各种解压与压缩/" rel="next" title="linux下的各种解压与压缩">
                <i class="fa fa-chevron-left"></i> linux下的各种解压与压缩
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2018/11/02/linux/ubuntu18.04的清华源的地址/" rel="prev" title="Ubuntu18.04 换清华源">
                Ubuntu18.04 换清华源 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <p class="site-author-name" itemprop="name">xiezc</p>
              <p class="site-description motion-element" itemprop="description">主要一些技术文章, 有些文章是转载的</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">72</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                
                  <span class="site-state-item-count">1</span>
                  <span class="site-state-item-name">分类</span>
                
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                
                  <span class="site-state-item-count">20</span>
                  <span class="site-state-item-name">标签</span>
                
              </div>
            

          </nav>

          

          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#frp在centos上的安装与配置"><span class="nav-number">1.</span> <span class="nav-text">frp在centos上的安装与配置</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#下载-frp"><span class="nav-number">1.1.</span> <span class="nav-text">下载 frp</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#修改客户端和服务端的配置"><span class="nav-number">1.2.</span> <span class="nav-text">修改客户端和服务端的配置</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#启动服务端"><span class="nav-number">1.3.</span> <span class="nav-text">启动服务端</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#启动客户端"><span class="nav-number">1.4.</span> <span class="nav-text">启动客户端</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#后台运行frp服务"><span class="nav-number">1.5.</span> <span class="nav-text">后台运行frp服务</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#服务端的配置-frps-ini"><span class="nav-number">1.5.1.</span> <span class="nav-text">服务端的配置 frps.ini</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#客户端的配置-frpc-ini"><span class="nav-number">1.5.2.</span> <span class="nav-text">客户端的配置 frpc.ini</span></a></li></ol></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2019</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">xiezc</span>

  
</div>


  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Gemini</a> v5.1.4</div>




        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  
  <script src="https://cdn1.lncld.net/static/js/av-core-mini-0.6.4.js"></script>
  <script>AV.initialize("eRAHvO0xVYwckgdXIVpfugRG-gzGzoHsz", "57lKp708hde92YeG1xX9MQj1");</script>
  <script>
    function showTime(Counter) {
      var query = new AV.Query(Counter);
      var entries = [];
      var $visitors = $(".leancloud_visitors");

      $visitors.each(function () {
        entries.push( $(this).attr("id").trim() );
      });

      query.containedIn('url', entries);
      query.find()
        .done(function (results) {
          var COUNT_CONTAINER_REF = '.leancloud-visitors-count';

          if (results.length === 0) {
            $visitors.find(COUNT_CONTAINER_REF).text(0);
            return;
          }

          for (var i = 0; i < results.length; i++) {
            var item = results[i];
            var url = item.get('url');
            var time = item.get('time');
            var element = document.getElementById(url);

            $(element).find(COUNT_CONTAINER_REF).text(time);
          }
          for(var i = 0; i < entries.length; i++) {
            var url = entries[i];
            var element = document.getElementById(url);
            var countSpan = $(element).find(COUNT_CONTAINER_REF);
            if( countSpan.text() == '') {
              countSpan.text(0);
            }
          }
        })
        .fail(function (object, error) {
          console.log("Error: " + error.code + " " + error.message);
        });
    }

    function addCount(Counter) {
      var $visitors = $(".leancloud_visitors");
      var url = $visitors.attr('id').trim();
      var title = $visitors.attr('data-flag-title').trim();
      var query = new AV.Query(Counter);

      query.equalTo("url", url);
      query.find({
        success: function(results) {
          if (results.length > 0) {
            var counter = results[0];
            counter.fetchWhenSave(true);
            counter.increment("time");
            counter.save(null, {
              success: function(counter) {
                var $element = $(document.getElementById(url));
                $element.find('.leancloud-visitors-count').text(counter.get('time'));
              },
              error: function(counter, error) {
                console.log('Failed to save Visitor num, with error message: ' + error.message);
              }
            });
          } else {
            var newcounter = new Counter();
            /* Set ACL */
            var acl = new AV.ACL();
            acl.setPublicReadAccess(true);
            acl.setPublicWriteAccess(true);
            newcounter.setACL(acl);
            /* End Set ACL */
            newcounter.set("title", title);
            newcounter.set("url", url);
            newcounter.set("time", 1);
            newcounter.save(null, {
              success: function(newcounter) {
                var $element = $(document.getElementById(url));
                $element.find('.leancloud-visitors-count').text(newcounter.get('time'));
              },
              error: function(newcounter, error) {
                console.log('Failed to create');
              }
            });
          }
        },
        error: function(error) {
          console.log('Error:' + error.code + " " + error.message);
        }
      });
    }

    $(function() {
      var Counter = AV.Object.extend("Counter");
      if ($('.leancloud_visitors').length == 1) {
        addCount(Counter);
      } else if ($('.post-title-link').length > 1) {
        showTime(Counter);
      }
    });
  </script>



  

  
<script>
(function(){
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';        
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>


  
  

  

  

  

</body>
</html>
